package com.ruoyi.dailyoperations.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dailyoperations.mapper.WarrantyClaimMapper;
import com.ruoyi.dailyoperations.domain.WarrantyClaim;
import com.ruoyi.dailyoperations.service.IWarrantyClaimService;

/**
 * 报修申请Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-14
 */
@Service
public class WarrantyClaimServiceImpl implements IWarrantyClaimService
{
    @Autowired
    private WarrantyClaimMapper warrantyClaimMapper;

    /**
     * 查询报修申请
     *
     * @param id 报修申请主键
     * @return 报修申请
     */
    @Override
    public WarrantyClaim selectWarrantyClaimById(Long id)
    {
        return warrantyClaimMapper.selectWarrantyClaimById(id);
    }

    /**
     * 查询报修申请列表
     *
     * @param warrantyClaim 报修申请
     * @return 报修申请
     */
    @Override
    public List<WarrantyClaim> selectWarrantyClaimList(WarrantyClaim warrantyClaim)
    {
        return warrantyClaimMapper.selectWarrantyClaimList(warrantyClaim);
    }

    /**
     * 新增报修申请
     *
     * @param warrantyClaim 报修申请
     * @return 结果
     */
    @Override
    public int insertWarrantyClaim(WarrantyClaim warrantyClaim)
    {
        return warrantyClaimMapper.insertWarrantyClaim(warrantyClaim);
    }

    /**
     * 修改报修申请
     *
     * @param warrantyClaim 报修申请
     * @return 结果
     */
    @Override
    public int updateWarrantyClaim(WarrantyClaim warrantyClaim)
    {
        return warrantyClaimMapper.updateWarrantyClaim(warrantyClaim);
    }

    /**
     * 接单报修申请
     *
     * @param warrantyClaim 报修申请接单
     * @return 结果
     */
    @Override
    public int receiveWarrantyClaim(WarrantyClaim warrantyClaim)
    {
        return warrantyClaimMapper.receiveWarrantyClaim(warrantyClaim);
    }

    /**
     * 拒单报修申请
     *
     * @param warrantyClaim 报修申请拒单
     * @return 结果
     */
    @Override
    public int rejectWarrantyClaim(WarrantyClaim warrantyClaim)
    {
        return warrantyClaimMapper.rejectWarrantyClaim(warrantyClaim);
    }


    /**
     * 批量删除报修申请
     *
     * @param ids 需要删除的报修申请主键
     * @return 结果
     */
    @Override
    public int deleteWarrantyClaimByIds(Long[] ids)
    {
        return warrantyClaimMapper.deleteWarrantyClaimByIds(ids);
    }

    /**
     * 删除报修申请信息
     *
     * @param id 报修申请主键
     * @return 结果
     */
    @Override
    public int deleteWarrantyClaimById(Long id)
    {
        return warrantyClaimMapper.deleteWarrantyClaimById(id);
    }
}
